-
Notifications
You must be signed in to change notification settings - Fork 649
add classname prop support to PageHeader component and its children #4667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add classname prop support to PageHeader component and its children #4667
Conversation
🦋 Changeset detectedLatest commit: a44d6a0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
broccolinisoup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wonderful! 💖 Thank you so much for raising the PR and providing a great PR description!
|
I am merging this so that I can include it in the current release! Thanks again 🙌🏻 |
Closes https://github.com/github/primer/issues/3331
This pull request introduces support for styling via CSS utility classes on the
PageHeadercomponent and its children by adding support for an optionalclassNameprop, allowing for more flexible customization without relying on Styled System props (sx). Full context: my team is currently in the process of deprecating our use ofsx, so this change will allow us to safely incrementally replacesxprops withclassNameprops.Changelog
New
classNameprop: AllPageHeadercomponents now accept aclassNameprop. This prop is applied to the root element of each component.classNameprop is optional and does not affect existing implementations that do not use this prop.PageHeadercomponents have been updated to include the newclassNameprop, ensuring type safety for TypeScript users.PageHeadercomponent documentation has been updated to include information about the newclassNameprop.Changed
N/A
Removed
N/A
Rollout strategy
Testing & Reviewing
Prerequisites
npm run setupto setup dependenciesClick testing
npm startto start the Storybook serverPageHeadercomponent in StorybookAutomated testing
npx playwright install --with-depsto install dependenciesnpx playwright test --grep @vrtto run visual regression testsnpx playwright test --grep @artto run accessibility testsMerge checklist